/**
 * NewsController
 * 
 * @description :: Server-side logic for managing News
 * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
 */

module.exports = {
		
	list : function(req, res) {
		
		News.find()
		.sort('updatedAt DESC')
		.then(function findCB(result) {
			console.log(JSON.stringify(result))
			return res.view('mobile/content/news-list', {
				news : result,
			});
		}).catch(function(err){
			sails.log.error(err);
			return res.serverError(err);
		});
		
	},
};

